cc.Class({
    extends: cc.Component,

    properties: {
        // 移动速度
        moveSpeed: 0
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad() {
        this.endX = -(this.node.width - cc.winSize.width) / 2;
    },

    start() {

    },

    update(dt) {
        if (!D.game.run) {
            return;
        }
        this.node.x -= this.moveSpeed;
        if (this.node.x < this.endX) {
            this.node.x = -this.endX
        }
    },
});
